    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>Title</title>
        <style>
            .box1{
                height: 200px;
                width: 300px;
                border: 1px solid #000;
                background: pink;
            }
        </style>
    </head>
    <body>
    <div class="box1" data-name="我是吴劲松"></div>
    <script>
        var box1=document.getElementsByClassName('box1')[0];
        box1.dataset['name']="我爱你"
     console.log(box1.dataset['name']);
    </script>
    </body>
    </html>